package Servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import Service.Servlet;
import vo.Kc;
import vo.User;


@WebServlet("/cless_cj")
public class Cless_cjServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private Servlet a = new Servlet();
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.setCharacterEncoding("UTF-8");
		Integer id=Integer.parseInt(request.getParameter("xsid"));
		User str =a.findxs(id);
		Integer cless_id=str.getBan().getId();
		List<Kc> kc =a.findAllcj(cless_id);
		List<User> xs = a.findBybjid(cless_id);
		List<List<Object>> ob = a.Deng(kc,xs);
		request.setAttribute("kc", kc);
		request.setAttribute("ob", ob);
		request.getRequestDispatcher("abc/cless_cj.jsp").forward(request, response);
	}

	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request, response);
	}

}
